<layout name='Layout/layout_page' />
	
	<ol class="breadcrumb">
		<li><a href="<{:U('Goods/index')}>">商品管理</a></li>
      	<li><a href="<{:U('ShopCate/index')}>"></a>商品分类</li>
      	<li class="active">编辑</li>
    </ol>


	<form id="ajaxForm" action="<{:U('ShopCate/update')}>" method="post" class="form-horizontal form-validata">
		<div class="form-group">
			<label class="col-md-1 control-label" for="name">父栏目</label>
			<div class="col-md-11">
				<select name="fid" id="fid" class="form-control">
				<option value="0">根栏目</option>
		        <volist name="clist" id="vo">
		        <option value="<{$vo['id']}>"><php>
		            for($i=0; $i<$vo['count']*2; $i++){
		               echo '&nbsp;&nbsp;';            
		            }
		        </php><{$vo['name']}></option>
		        </volist>
		        </select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-md-1 control-label" for="name">名称</label>
			<div class="col-md-11">
				<input type="text"
                class="form-control"
				name="name"
				id="name"
				data-rule-required="true"
				value="<{$list['name']}>"
				/>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label" for="picname">分类图片</label>
			<div class="col-md-11">
				<img class="thumbPic" id="picname_src" src="<?php if($list['picname']){echo $list['picname'];}else{ echo STATICS.'/image/image.jpg';} ?>" />
				<input type="hidden" name="picname" id="picname" value="<{$list['picname']}>" />
				<p class="pic-btn"><input type="button" value="上传" class="btn btn-default btn-sm" onclick="uploadImage( '<{:U('Admin/Upload/singleImage')}>' , 'picname')"/> <input type="button" value="删除图片" class="btn btn-default btn-sm" onclick="delImage('picname')"/></p>
			</div>
		</div>

		<div class="form-group">
			<label class="col-md-1 control-label">排序</label>
			<div class="col-md-2">
				<input type="text"
                class="form-control"
				name="sort"
				id="sort"
				data-rule-required="true"
				data-rule-number="true"
				value = "<{$list['sort']}>"
				/>
				<p>数字越小越靠前</p>
			</div>
		</div>
	
		<div class="form-group">
			<div class="col-md-11 col-md-offset-1">
				<button type="submit" class="btn btn-info"><i class="icon-edit icon-white"></i> 编辑栏目</button>
			</div>
		</div>
		<input type="hidden" name="id" value="<{$list['id']}>" />
		<input type="hidden" name="thisFID" value="<{$list['fid']}>" />
		<input type="hidden" name="path" value="<{$list['path']}>" />
	</form>
<script type="text/javascript">
$("#fid").val("<{$list['fid']}>");
</script>


<input type="hidden" id="menu_action" value="goods" />
